<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <!-- CSS goes in the document HEAD or added to your external stylesheet -->
    <style type="text/css">
        table.gridtable {
            width:800px;
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
        }
        table.gridtable th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }
        table.gridtable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
        }
    </style>

</head>
<body>
<div id="main" style="width:960px; margin: 0 auto;">

<?php echo form_open('weibo_fetch/sina_fetch/weibo_page'); ?>
<table width="550">
    <tr>
        <td colspan="2">根据新浪微博url获取微博信息</td>
    </tr>
    <tr>
        <td class="itemName"><label name="url">微博列表：</label></td>
        <td><textarea name="urls" id="urls" cols="50" rows="10"><?= $urls?></textarea></td>
    </tr>

    <tr>
        <td colspan="2"><input type="submit" value="submit" name="sub"/></td>
    </tr>
</table>
</form>

<hr>
<div id="show_weibos" style="">
    <?php if(!empty($weibo_tree)):?>
        <?php foreach($weibo_tree as $weibo){ ?>

            <table class="gridtable">
                <tr>
                    <th style="width: 50%">url</th>
                    <th>转发</th>
                    <th>评论</th>
                    <th>点赞</th>
                </tr>
                <tr>
                    <td><?= $weibo['url'] ?></td>
                    <td><?= $weibo['reposts_count'] ?></td>
                    <td><?= $weibo['comments_count'] ?></td>
                    <td><?= $weibo['attitudes_count'] ?></td>
                </tr>
            </table>

            <br>
            <hr>
        <?php } ?>
    <?php endif;?>
</div>
</div>
</body>
</html>